Auto merge of #2900 - matklad:lazy-config, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 21 Jul 2016 17:29:14 +0000 (10:29 -0700)
committerGitHub <noreply@github.com>
Thu, 21 Jul 2016 17:29:14 +0000 (10:29 -0700)
commit76f3b6b860950e7178c0cf45d94a71dcf0fc4325
treeefdb8236175833b7b11144ec0409a8d65420801a
parent664125b940f4d7deea7db02f96a7771ee64e0a62
parent4639f9b5527a0c7df2abb0592e90459138c07688
Auto merge of #2900 - matklad:lazy-config, r=alexcrichton

Lazy config

Next piece of #2848.

* `config.rustc`  and `config.rustdoc` are now lazy.
* `Rustc` and not `config.rustc` now knows the path to the compiler.
* `LazyCell` is used to implement laziness

No new tests are added, because we need to lazify `target_path` to deal with broken cargo config.

`target_path` is a bit peculiar. It is always accessed as `ws.config.target_path(ws)`, and has a setter. Perhaps it belongs to the workspace? Will look into that later.